<!--{template header}-->

<!--{if $op == 'send' || $op == 'edit'}-->
<div id="$tospace[uid]" <!--{if !$_SGLOBAL[inajax]}-->class="inpage"<!--{/if}-->>
<!--{if $_SGLOBAL[inajax]}-->
<div class="popupmenu_border">
<h1>
<!--{if $event_type==1 }-->
约 {$_SN[$tospace[uid]]} 过招
<!--{else}-->
向 {$_SN[$tospace[uid]]} 请教
<!--{/if}-->
</h1>
<a href="javascript:hideMenu();" title="关闭" class="float_del">关闭</a>
<div class="popupmenu_inner">
<!--{/if}-->

<!--{if $cantinterest}-->
	<span class="red">该玩家没有填写任何兴趣爱好，不知道可以约Ta过什么招！</span>
<!--{elseif $cantskill}-->
	<span class="red">该玩家没有任何擅长的技能，没办法向Ta请教啊！</span>
<!--{else}-->

<form method="post" id="consultform_{$tospace[uid]}" name="consultform_{$tospace[uid]}" action="cp.php?ac=consult&op=$op&uid=$tospace[uid]&event_type={$event_type}">


<table cellpadding="2" cellspacing="2" border="0">
	<tr>
    	<td align="left" valign="top" style="width:71px;"><div class="avatar48"><a href="space.php?uid=$tospace[uid]"><img src="<!--{avatar($tospace[uid],small)}-->" alt="{$_SN[$tospace[uid]]}" width="48" height="48" /></div></td>
        <td>
			<table cellpadding="2" cellspacing="2" border="0">
				<tr>
					<td style="padding:3px 0;">具体时间：</td>
					<td>
					<input type="text" style="width:80px;height:17px;" name="eventdate" id="eventdate" onclick="calendar.showMoreDay = false;calendar.show(this);"" value="<!--{$tomorrow}-->" />
					<select id="eventhour" name="eventhour">
					<!--{$event_hour_select}-->
					</select> 时
					<select id="eventminute" name="eventminute">
					<!--{$event_min_select}-->
					</select> 分
					</td>
				</tr>
				<tr>
					<td style="padding:3px 0;">具体地点：</td>
					<td>
					<input type="text" style="width:200px;" name="eventaddr" value="" />
					</td>
				</tr>
				<tr>
					<td style="padding:3px 0;">所涉分类：</td>
					<td>
					<select name="eventinfo" id="eventinfo">
						<!--{$event_info_select}-->
					</select>
					</td>
				</tr>
				<!--{if $event_type==2 }-->
				<tr>
					<td style="padding:3px 0;">预算报酬：</td>
					<td>
					<input type="text" style="width:44px;" name="eventpay" id="eventpay" value="0" /> RMB
					</td>
				</tr>
				<!--{/if}-->
				<tr>
					<td style="padding:3px 0;" valign="top">其他说明：</td>
					<td>
					<textarea name="eventdetail" id="eventdetail" style="width:201px; height:60px;"></textarea>
					<p class="gray">(这样可以让对方对这件事更加感兴趣)</p>
					</td>
				</tr>
			</table>
		
		</td>
    </tr>
	<tr>
		<td>&nbsp;</td>
		<td>
			<input type="hidden" name="refer" value="$_SGLOBAL[refer]">
			<input type="hidden" name="consultsubmit" value="true" />
			<input type="hidden" name="id" value="$id" />
			<!--{if $_SGLOBAL[inajax]}-->
			<input type="button" name="consultsubmit_btn" id="consultsubmit_btn" value="发送申请" class="submit" onclick="ajaxpost('consultform_{$tospace[uid]}', '$tospace[uid]')" />
			<!--{else}-->
			<input type="submit" name="consultsubmit_btn" id="consultsubmit_btn" value="发送申请" class="submit" />
			<!--{/if}-->
		</td>
	</tr>
</table>



<input type="hidden" name="formhash" value="<!--{eval echo formhash();}-->" />
</form>

<!--{/if}-->


<!--{if $_SGLOBAL[inajax]}--></div></div><!--{/if}-->
</div>

<!--{else}-->

<h2 class="title"><img src="image/icon/poke.gif">项目管理</h2>
<div class="tabs_header">
	<ul class="tabs">
		<li $actives[latest]><a href="cp.php?ac=consult&op=latest"><span>最新的项目</span></a></li>
		<li $actives[underway] ><a href="cp.php?ac=consult&op=underway"><span>进行中的项目</span></a></li>
		<li $actives[finished] ><a href="cp.php?ac=consult&op=finished"><span>已完成的项目</span></a></li>
		<li $actives[my] ><a href="cp.php?ac=consult&op=my"><span>我发起的项目</span></a></li>
		<li class="null"><a href="cp.php?ac=consult&op=add">发起新悬赏</a></li>
	</ul>
</div>

<div class="h_status">您可以在此管理自己的项目<span class="pipe">|</span><a href="#">到所有项目的页面</a></div>

<!--{if $list}-->
<div class="c_form" id="consult_ul">
	<table cellpadding="4" cellspacing="4" width="100%">
		<!-- 列表 -->
		<!--{eval //print_r($list)}-->
		<tr>
		<td width="80">发起人</td><td width="70">类型</td><td  width="120">时间</td><td>地点</td><td>项目</td><td>详细</td><td width="120">操作</td>
		</tr>
		<!--{eval $type = array(1 => '玩家约玩家',2 => '玩家约教头',3 => '武林大会',4 => '悬赏令',)}-->
		<!--{loop $list $key $value}-->
			<tr>
				<td><div class="avatar48"><a href="space.php?uid=$value[uid]"><img src="<!--{avatar($value[uid],small)}-->" alt="{$_SN[$value[uid]]}" /></a></div></td>
				<td> $type[$value[eventtype]]</td>
				<td> <!--{date('Y-m-d H:i',$value[eventtime])}--></td>
				<td> $value[eventaddr]</td>
				<td> $value[eventinfo]</td>
				<td> $value[eventdetail]</td>
				<td>查看详细 编辑 删除</td>
			</tr>
		<!--{/loop}-->
	</table>
	<div class="page">$multi</div>
</div>
<!--{else}-->
<div class="c_form">
	还没有新的项目。
</div>
<!--{/if}-->

<!--{/if}-->

<!--{template footer}-->